import { Tabs } from 'antd-mobile'
import { CalendarPicker, List } from 'antd-mobile'
import { useState } from 'react'
import withLogin from '../hoc/withLogin'
function Home() {
    const [visible1, setVisible1] = useState(false)
    
    return (
        <div>
            <Tabs>
                <Tabs.Tab title='国内火车票' key='fruits'>
                    <div>
                        <h2>杭州-----厦门</h2>
                        <List header='日期选择'>
                            <List.Item
                                onClick={() => {
                                    setVisible1(true)
                                }}
                            >
                                10月21日明天
                                <CalendarPicker
                                    visible={visible1}
                                    selectionMode='single'
                                   
                                    onClose={() => setVisible1(false)}
                                    onMaskClick={() => setVisible1(false)}
                                />
                            </List.Item>
                           </List>
                    </div>
                </Tabs.Tab>
                <Tabs.Tab title='机票' key='vegetables'>
                    机票
                </Tabs.Tab>
                <Tabs.Tab title='汽车票' key='animals'>
                    汽车票
                </Tabs.Tab>
            </Tabs>
        </div>
    )
}
export default withLogin(Home)